﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shsc.Net.FrameWork.Common.Validator
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
    public abstract class BaseCheckAttribute : Attribute
    {
        /// <summary>
        /// 消息ID
        /// </summary>
        protected string _messageId;

        /// <summary>
        /// 消息ID
        /// </summary>
        public string MessageId
        {
            set { _messageId = value; }
        }

        /// <summary>
        /// 消息參數
        /// </summary>
        protected string[] _msgParams;

        /// <summary>
        /// 
        /// </summary>
        public string[] msgParams
        {
            set { _msgParams = value; }
        }

        /// <summary>
        /// 目標Action
        /// </summary>
        public string[] DescAction
        {
            get;set;
        }

        public abstract string DoCheck(object obj, string fieldName);
    }
}
